<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<html>
<head>
  <title>查询职位历史</title>
</head>

<body>
  <c:if test="${not empty message}">
    <div id="message" class="alert alert-success"><button data-dismiss="alert" class="close">×</button>${message}</div>
  </c:if>

  <table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead><tr><th width="60%">职位名称</th><th width="20%">变更时间</th><th width="20%">变更人</th></tr></thead>
    <tbody>
    <c:forEach items="${historys.content}" var="history">
      <tr>
        <td><a href="${ctx}/hr/position/${history.position.id}/history/${history.id}">${history.name}</a></td>
        <td><fmt:formatDate value="${history.recordDate}" pattern="yyyy-MM-dd" /></td>
        <td>${history.recordHrUser.name}</td>
      </tr>
    </c:forEach>
    </tbody>
  </table>
  
  <tags:pagination page="${historys}" paginationSize="20"/>

  <div><a class="btn" href="${ctx}/hr/position">返回</a></div>
</body>
</html>
